#include<iostream>
using namespace std;
int a, b, c;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> a >> b >> c;
		if (a > b + c) cout << (b + c) * 2 + 1 << endl;
		//else if (a == b + c)cout << a + a - 1 << endl;
		else cout << a + a - 1 << endl;
	}
	return 0;
}